<template>
	<div class="detail-title">
		<div class="detail-title-container">
			<div class="detail-title-name" v-html="basicInfo.name"></div>
			<div class="detail-title-characteristic" v-html="basicInfo.characteristic"></div>
			<div v-if="!basicInfo.pingtuan&&!basicInfo.kanjia" class="detail-title-default">
				<div class="detail-title-default-price">
					<span>{{basicInfo.minPrice | formatMoney}}</span>
					<del>{{basicInfo.originalPrice | formatMoney}}</del>
				</div>
				<div class="detail-title-default-sells">
					<span>已售{{basicInfo.numberSells}}</span>
				</div>
			</div>
			<div v-if="basicInfo.kanjia" class="detail-title-kanjia">
				<div class="detail-title-kanjia-price">
					<span><sub>底价</sub>{{basicInfo.minPrice | formatMoney}}</span>
					<span>原价{{basicInfo.originalPrice | formatMoney}}</span>
				</div>
				<div class="detail-title-kanjia-stores">
					<span>库存{{basicInfo.stores}}</span>
				</div>
			</div>
		</div>
		<div v-if="basicInfo.pingtuan" class="detail-title-group">
			<div class="detail-title-group-price">
				<div>
					<span>拼团价￥</span>
					<b>{{basicInfo.pingtuanPrice}}</b>
				</div>
				<div>
					<p>2人开团</p>
					<p>
						<del>原价{{basicInfo.originalPrice | formatMoney}}</del>
					</p>
				</div>
			</div>
			<div class="detail-title-group-number">
				<span>已团{{basicInfo.numberOrders | formatUnit}}</span>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		name: "Title",
		props: {
			basicInfo: {
				type: Object,
				required: true
			}
		}
	}
</script>
